package com.cyq.day03;

import java.util.Scanner;

public class HomeWorkDay03 {
    /**
    个人所得税计算，低于5000不交
     超过3000以内，百分之3
     超过3000至12000部分，百分之10
     超过12000至25000部分，百分之20
     超过25000至35000部分，百分之25
     超过35000至于55000部分，百分之30
     55000-80000，百分之35
     80000上，百分之45
     */
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入个人收入");
        double wages=sc.nextDouble();
        double tax;
        if (wages<5000){
            tax=0;
        }else if (wages<8000){
            tax=(wages-5000)*0.03;
        }else if(wages<17000){
            tax=(wages-8000)*0.1+90;
        }else if (wages<30000){
            tax=(wages-17000)*0.2+90+900;
        }else if (wages<40000){
            tax=(wages-30000)*0.25+90+900+2600;
        }else if (wages<60000){
            tax=(wages-40000)*0.3+90+900+2600+2500;
        }else if (wages<85000){
            tax=(wages-60000)*0.35+90+200+2600+2500+6000;
        }else {
            tax=(wages-80000)*0.45+90+200+2600+2500+6000+8750;
        }
        System.out.println("你需要缴纳的个人所得税为"+tax+"元");

    }
}
